from django.contrib import admin
from django.urls import path, include
from .import views
from rest_framework.routers import DefaultRouter
from rest_framework_simplejwt.views import TokenObtainPairView
urlpatterns = [
    # 主路由分发子路由 user
    # 127.0.0.1:8000/user/verification/register/uuid
    # path('verification/register/<uuid:uuid>/', views.ImageVerifyView.as_view(), name='verifycation'),
    path("verification/<str:func>/<uuid:uuid>/", views.ImageVerifyView.as_view(), name='verifycation'),
    # 127.0.0.1:8000/user/login/
    path("login/", views.MyTokenObtainViews.as_view()),
]
router = DefaultRouter()
router.register('users', views.UserViewSet)
router.register('area', views.AreaViewSet)
router.register('address', views.AddressViewSet)
urlpatterns += router.urls

